import WxmpRsa from 'wxmp-rsa'

const rsaEncrypt = (publicKey, str) => {
	const rsa = new WxmpRsa()
	rsa.setPublicKey(publicKey);
	const data = rsa.encryptLong(str)
	console.log(data);
	return data
	// console.log(publicKey, str)
	// const jse = new JSEncrypt();
	// //设置公钥
	// jse.setPublicKey(publicKey);
	// return jse.encrypt(str);
}

export default rsaEncrypt;